/*
 * Copyright (C) 2013 The i18nCTS Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.googlecode.i18nCTS.view;

import java.util.Calendar;
import java.util.Locale;

import android.text.format.DateUtils;
import android.util.Log;

import com.googlecode.i18nCTS.provider.i18nCTSProvider;
import com.googlecode.i18nCTS.util.i18nCTSUtils;

public class DateUtilsNoonMidnightSectionFragment extends AbstractSectionFragment {
	private static final String TAG = "I18nCTS_" + DateUtilsNoonMidnightSectionFragment.class.getSimpleName();
	public static final String CATEGORY = "DateUtils_NoonMidnight";
	static int flags = 0;

	public DateUtilsNoonMidnightSectionFragment() {
		Log.d(TAG, "ctr");
	}

	@SuppressWarnings("deprecation")
    void buildNoonMidnight(i18nCTSProvider provider) {
		Calendar cal = Calendar.getInstance(Locale.getDefault());
		long curTime =0;
		long curTime2 =0;
		int flag = 0;

	    i18nCTSUtils utils = new i18nCTSUtils(mContext);

		// noon, midnight only appears for 12hr format.
	    // (hour zero never shows as midnight!!!!, so no test is done)
	    String noon;
	
	    // noon
		cal.set(2012, 12, 5, 12, 0, 0);
		curTime = cal.getTimeInMillis();
		flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime, flag);
	    provider.addData(noon, utils.getParam(flag) + "[12:00:00]");
	    flag =  DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime,flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00]");
	    flag =  DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime, flag );
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00]");
	
	    cal.set(2012, 12, 5, 12, 34, 0); 
		curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    
	    cal.set(2012, 12, 15, 12, 34, 0); 
		curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	
	    cal.set(2013, 12, 15, 12, 34, 0); 
		curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 12:34:00]");
	    
	    cal.set(2012, 12, 5, 9, 34, 0);
		curTime = cal.getTimeInMillis();
		cal.set(2012, 12, 5, 12, 0, 0); 
		curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON;
	    noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
	    noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	
	    cal.set(2012, 12, 15, 12, 0, 0); 
		curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON;
	    noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
	    noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	
	    cal.set(2013, 12, 15, 12, 0, 0); 
		curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON;
	    noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
	    noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [9:34:00 - 12:00:00]");
	
	    // mid-night
	    cal.set(2012, 12, 5, 24, 0, 0); 
		curTime = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime, flag);
	    provider.addData(noon, utils.getParam(flag) + " [24:00:00]");
	
	//	calendar.set(2012, 12, 5, 24, 0, 0); 
	//    curTime2 = calendar.getTimeInMillis();
	//	noon = DateUtils.formatDateRange(mContext,curTime, curTime2, DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR);
	//    provider.addData(noon, utils.getParam(flag) + "FORMAT_SHOW_TIME|FORMAT_12HOUR 24:00:00 - 24:00:00]");
	
	    cal.set(2012, 12, 5, 23, 34, 0); 
		curTime = cal.getTimeInMillis();
		cal.set(2012, 12, 5, 24, 0, 0); 
	    curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	
	    cal.set(2012, 12, 15, 24, 0, 0); 
	    curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	
	    cal.set(2013, 12, 15, 24, 0, 0); 
	    curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + "  [23:34:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [23:34:00 - 24:00:00]");
	
	    // range from noon to midnight
	    cal.set(2012, 12, 5, 12, 0, 0); 
		curTime = cal.getTimeInMillis();
		cal.set(2012, 12, 5, 24, 0, 0); 
	    curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) +  " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_CAP_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_MIDNIGHT | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	
	    cal.set(2012, 12, 15, 24, 0, 0); 
	    curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_CAP_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_MIDNIGHT | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	
	    cal.set(2013, 12, 15, 24, 0, 0); 
	    curTime2 = cal.getTimeInMillis();
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_CAP_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON | DateUtils.FORMAT_CAP_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_MIDNIGHT | DateUtils.FORMAT_CAP_NOON;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	    flag = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_12HOUR | DateUtils.FORMAT_NO_NOON_MIDNIGHT;
		noon = DateUtils.formatDateRange(mContext,curTime, curTime2, flag);
	    provider.addData(noon, utils.getParam(flag) + " [12:00:00 - 24:00:00]");
	
	    provider.addTitle(CATEGORY);
	}

	@Override
	public String getCategory() {
		return CATEGORY;
	}
	
	@Override
	public void buildList(i18nCTSProvider provider) {
        buildNoonMidnight(provider);        		
  	}
}

